const getEventHub = require('../../api/event-hub').getEventHub

Page({
  navigateBackToMiniprogram() {
     const payload = {
       a: 1,
       b: 2
     }
     const eventHub = getEventHub();
     eventHub.dispatchEvent('navigateBackToMiniprogram', payload) 
  },
  reLaunchToHomePage() {
    const payload = {
       a: 3,
       b: 4
     }
     const eventHub = getEventHub();
     eventHub.dispatchEvent('reLaunchToHomePage', payload) 
  }
})